<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>纳税企业基本信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script src="${ctx}/js/table.js" type="text/javascript" language="javascript"></script>
	<link rel="stylesheet" href="${ctx}/css/ui.datepicker.css" type="text/css" media="screen" charset="utf-8" />
	<script  src="${ctx}/js/jquery-1.5.2.js" type="text/javascript" charset="utf-8"></script>	
	<script src="${ctx}/js/ui.datepicker.js" type="text/javascript" charset="utf-8"></script>	
	<script src="${ctx}/js/ui.datepicker-zh-CN.js" type="text/javascript" charset="utf-8"></script>	
	<script type="text/javascript" src="${ctx}/js/help.js"></script>	
<style type="text/css">
#Layer1 {
	position:absolute;
	width:1070px;
	height:263px;
	z-index:1;
	left: 0px;
	top: 172px;
}
body {
	background-color:#F2FDDB;
}
#content {
	position:absolute;
	width:1070px;
	height:172px;
	z-index:2;
	left: 0px;
	top: 0px;
}
.style{
background-color:#CCCCFF;
border:1px solid #BFD1EB;
}
a{
text-decoration:none;
}
a:link,a:visited,a:hover{
text-decoration:none;
color:#333333;
}
#tishi {
	position:absolute;
	width:189px;
	height:40px;
	z-index:3;
	left: 6px;
	top: 45px;
}
#div1{
position:absolute;
background:#FFFFCC;
left:880px;
top:55px;
overflow:hidden;
width:180px;
display:none;
z-index:5;
}
.c {width:20px;height:20px;}
.c ul {margin:0px;padding:0px;}
.c ul li{width:16px;height:17px;float:left; 
background-image:url('${pageContext.request.contextPath}/images/help.jpg');
list-style-type:none}
.STYLE1 {color: #FF0000}
</style>
<script language="javascript" type="text/javascript">
function validate()
{    var j=document.getElementById("t2").value;
     var l=document.getElementById("t1").value;
     document.form1.bu_idNumber.value=j+l;
     if(document.getElementById("bu_payerName").value==""){
     alert("纳税人名称 不能为空，请输入");
     return false;}
	  if(document.form1.t1.value==""){
     alert("请输入企业编号！");
     return false;}
	     if(document.form1.t1.value.length!=9){
		     alert("企业编号长度为9位数字！");
		     return false;}
	  if(document.getElementById("bu_manageType").value==""){
     alert("企业经营方式 不能为空，请输入");
     return false;}
     if(document.getElementById("bu_trade").value==""){
     alert("所属行业 不能为空，请输入");
     return false;}
     if(document.getElementById("bu_levyType").value==""){
     alert("企业征税方式 不能为空，请输入");
     return false;}
     if(document.getElementById("bu_amount").value==""){
     alert("资产总额 不能为空，请输入");
     return false;}
     if( parseInt(document.getElementById("bu_regMoney").value) >  parseInt(document.getElementById("bu_amount").value)){
         alert("资产总额比注册资本要高");
         return false;}
	 
     if(document.getElementById("bu_phone").value==""){
     alert("联系方式 不能为空，请输入");
     return false;}
	 return true;
 }
function checkByName()
{
	var taxplayer = $("#bu_payerName").val();
    $.ajax({   
        url:"${ctx}/taxmanage/tmCompInfo_check.action",   
        type:"post",   
        data:{"taxplayer":$("#bu_payerName").val()},   
        dataType:"json",   
        success:function(data){  
             var k=typeof(data);
			 if(k=="object"){
			  $('#bu_businessType').val(data.bizEntity.regtype);
			  $('#bu_manageType').val(data.bizEntity.managetype);
			  $('#bu_regMoney').val(data.bizEntity.regcapital);
			  $('#bu_trade').val(data.bizEntity.trade);
			  $('#bu_phone').val(data.bizEntity.phone);
		     }
			 if(k=="string"){
				 alert(data);
			 }
          }    
     });   
 return false; 
}
</script>
</head>

<body>
<div id="Layer1">
<table width="100%" height="273" border="0" cellspacing="0">
  <tr>
    <td colspan="5">
	<table width="1070" height="30" border="1" cellspacing="0" bordercolor="#666666" frame="above" rules="rows" class="style">
    <tr style="background-color:#CCCCFF; font-size:13px; color:#849BCA" align="center">
      <td width="145" height="30">纳税人识别码</td>
      <td width="238">纳税人名称</td>
      <td width="129">企业经营方式</td>
      <td width="117">所属行业</td>
      <td width="104">征税方式</td>
      <td width="144">企业类别</td>
      <td width="82">注册资本</td>
      <td width="77">资产总额</td>
    </tr>
	</table>
	</td>
    </tr>
  <tr>
    <td height="213" colspan="5" valign="top">
	<table width="1069" border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFCCFF" id="tbColor"  frame="hsides" rules="cols">
	<c:forEach items="${pageView.records}" var="entity">
    <tr style="font-size:12px" align="center">
      <td width="144">${entity.taxcode}</td>
      <td width="239" align="left">${entity.taxplayer}</td>
      <td width="128">${entity.managetype}</td>
      <td width="118">${entity.trade}</td>
      <td width="104">${entity.levytype}</td>
      <td width="144">${entity.biztype}</td>
      <td width="82">${entity.regcapital}</td>
      <td width="76">${entity.amount}</td>
    </tr>
	</c:forEach>
	</table>
	</td>
    </tr>
<%@ include file="/pages/taxmanage/fenye.jsp"%>
</table>
</div>
<div id="content">
<table width="100%" height="100%" border="0">
  <tr>
    <td>
	<form  id="form1" name="form1"action="${ctx}/taxmanage/tmCompInfo_execute.action" method="post" onSubmit="return validate();">
       <fieldset>
   <legend style="font-size:15px; color:#333333">纳税企业基本信息登记</legend>
   <table width="861" height="142" border="0" align="center" cellspacing="0" style="font-size:13px; color:#333333">
  <tr>
  <td width="113" align="right">纳税人名称：</td>
    <td width="180" height="30"><input  style="width:180px;"type="text" name="entity.taxplayer" id="bu_payerName" onBlur="checkByName()"></td>
    <td width="118"  align="right">纳税人识别码：</td>
    <td width="153">
	<input style="width:50; color:#999999" type="text" readonly id="t2" value="610000">+<input type="text" style="width:80px" id="t1" onKeyUp="value=value.replace(/[^\d]/g,'') " onbeforepaste="clipboardData.setData('text'),clipboardData.getData('text').replace(/[^\d]/g,''))" /> </td>
    
    <td width="133" align="right">金额单位：</td>
    <td width="117"><input  style="width:70px; color:#999999"type="text" readonly name="entity.captialtype"  value="万元"></td>
    <td width="33">
    <div class="c">
          <ul>
            <li onMouseOver="f_s('div1')" onMouseOut="closeW('div1')"></li>
          </ul>
        </div>帮助</td>
  </tr>
  <tr>
    <td height="31" align="right">企业经营方式：</td>
    <td><input  style="width:100px; color:#999999"type="text" readonly name="entity.managetype" id="bu_manageType"></td>
    <td align="right">所属行业：</td>
    <td><input  style="width:120px; color:#999999"type="text" readonly name="entity.trade" id="bu_trade"></td>
    <td align="right">企业所得税征收方式：</td>
    <td colspan="2">
	<select name="entity.levytype" id="bu_levyType">
            <option disabled selected>--请选择--</option>
            <option value="查账征收">查账征收</option>
            <option value="查定征收">查定征收</option>
            <option value="查验征收">查验征收</option>
            <option value="定期定额征收">定期定额征收</option>
          </select></td>
    </tr>
  <tr>
    <td height="26" align="right">企业类别：</td>
    <td><input style="width:120px; color:#999999" type="text" readonly name="entity.biztype" id="bu_businessType"></td>
    <td align="right">注册资本：</td>
    <td><input style="width:80px; color:#999999" type="text" readonly name="entity.regcapital" id="bu_regMoney"></td>
    <td align="right">资产总额：</td>
    <td colspan="2"><input  style=" width:80px;"type="text" name="entity.amount" id="bu_amount"></td>
  </tr>
  <tr>
    <td height="28" align="right">联系电话(固定)：</td>
    <td><input  style="width:100px; color:#999999" readonly type="text" name="entity.phone" id="bu_phone"></td>
    <td align="right"><input type="hidden" name="entity.taxcode" id="bu_idNumber"></td>
    <td colspan="4" align="center" style="color:#FF0000">企业纳税人识别码是由税务局所在地区的代码+该企业的编号组成</td>
    </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td align="right">&nbsp;</td>
    <td><input  style="width:70px; height:25px;"type="submit" name="Submit" value="提  交"></td>
    <td><input  style="width:70px; height:25px;"type="reset" name="Submit2" value="重  置"></td>
    <td>&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
</fieldset>
  </form>
	</td>
  </tr>
</table>
<div id="div1" onMouseOver="showDiv()" onMouseOut="closeW('div1')">
<fieldset>
<fieldset>
<table width=100%  height="240" border="1" cellspacing="0" frame="void" rules="rows">
  <tr>
    <td align="left" style="font-size:13px;" height="25">帮助提示：</td>
  </tr>
  <tr>
    <td align="left" style="font-size:12px" valign="top">1.纳税人名称为企业名称;
	<br><br>2.纳税人识别码由地区代码+企业编号组成,企业编号唯一,由9个数字组成;<br><br>3.企业所得税征收方式请按实选择<br><br>4.企业基本信息部分信息从开业登记中获取
	</td>
  </tr>
</table>
</fieldset>
</fieldset>
</div>
</div>
   </body>
</html>
